﻿@model IEnumerable<WeProjectsModel.Tag>

@{
    ViewBag.Title = "Index";
}

<h2>标签管理</h2>

<p class="buttonIn">
    @Html.ActionLink("新建标签", "Create")
</p>
@if (Model.Count() > 0) {
<table class="table">
    <tr>
        <th>
            标签代码
        </th>
        <th>
            标签名称
        </th>
        <th>操作</th>
    </tr>
    
@foreach (var item in Model) {
    <tr><td>
    @Html.DisplayFor(modelItem => item.Code)
</td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        
        <td>
            @Html.ActionLink("编辑", "Edit", new { id = item.Code }, new { @class = "btn btn-success btn-small" })&nbsp;
            @Html.ActionLink("删除", "Delete", new { id = item.Code }, new { @class = "btn btn-danger btn-small" })
        </td>
    </tr>
}
</table>
}
else
{
    <b>还没有标签，请先创建。</b>
}
